#include "section_define.h"
#include "section5_change_func.h"
#include "main.h"

#ifdef PBS_FILTER
extern unsigned char g_uNo5RegList[PBS_NO5REGSIZE];
extern int My_Memcmp(unsigned char *data1,unsigned char *data2,unsigned short len);
#endif


unsigned char on_section5_change(unsigned short addr, unsigned char* regdata)
{
	unsigned char regdata_len = 0xff;
//	Log_Printf("addr = 0x%04X\r\n",addr);
	InDoorBusReg Reg = {0},Reg_Before = {0};
	Reg.V8 = regdata[0];
	
//	uint8_t temp = 0;

	switch(addr)
	{
		case SECTION5_ADDR_H400:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A400_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H402:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A402_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H404:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A404_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H406:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A406_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H408:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A408_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H40A:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A40A_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H40C:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A40C_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H40E:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A40E_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H410:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A410_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H412:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A412_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H414:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A414_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H416:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A416_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H418:
			regdata_len = 1;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],1)) return regdata_len;
#endif						
			A418_12_56_StatusChange(regdata[0]);
		
		break;
		
		case SECTION5_ADDR_H419:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A419_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H41B:
			regdata_len = 1;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],1)) return regdata_len;
#endif						
			A41B_12_56_StatusChange(regdata[0]);
		
		break;
		
		case SECTION5_ADDR_H41C:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A41C_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H41E:
			regdata_len = 1;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],1)) return regdata_len;
#endif						
			A41E_12_56_StatusChange(regdata[0]);
		
		break;
		
		case SECTION5_ADDR_H41F:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A41F_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H421:
			regdata_len = 1;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],1)) return regdata_len;
#endif						
			A421_12_56_StatusChange(regdata[0]);
		
		break;
		
		case SECTION5_ADDR_H422:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A422_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H424:
			regdata_len = 1;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],1)) return regdata_len;
#endif						
			A424_12_56_StatusChange(regdata[0]);
		
		break;
		
		case SECTION5_ADDR_H425:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A425_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		case SECTION5_ADDR_H427:
			regdata_len = 1;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],1)) return regdata_len;
#endif						
			A424_12_56_StatusChange(regdata[0]);
		
		break;
		
		case SECTION5_ADDR_H428:
			regdata_len = 2;
#ifdef PBS_FILTER
			if(My_Memcmp(regdata,&g_uNo5RegList[addr-0x400],2)) return regdata_len;
#endif						
			A428_12_56_StatusChange((regdata[1]<<8)|regdata[0]);
			
		break;
		
		default:
		
		break;		
	}
	
	return regdata_len;
			
}

